From: Florian Müllner Date: Sat, 15 Sep 2012 21:01:56 +0000 (+0200) Subject: messageTray: Move focus ourselves when entering by keybinding X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~5822 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=6ef3c628e66744f3ce44fb8798b220b61e338960;p=gnome-shell.git messageTray: Move focus ourselves when entering by keybinding When the tray is triggered by keybinding rather than dwelling, the first summary item should be given key focus. Currently this is achieved by grabbing the focus before toggling the tray, so that the grabHelper will move the focus for us. However this interferes with the grabHelper's focus save/restore mechanism - for instance, after using the keybinding once, the tray will always come up with the first item focused. https://bugzilla.gnome.org/show_bug.cgi?id=682243 --- diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js index 5a2e3d266..30cb6a7e6 100644 --- a/js/ui/messageTray.js +++ b/js/ui/messageTray.js @@ -1715,10 +1715,8 @@ const MessageTray = new Lang.Class({ }, toggleAndNavigate: function() { - // Grab the key focus so that GrabHelper knows - // that we have the key grab. - this._summary.grab_key_focus(); this.toggle(); + this._summary.navigate_focus(null, Gtk.DirectionType.TAB_FORWARD, false); }, hide: function() {